// NotFound.js
import React from "react";
import { Button } from "antd";
import { Link } from "react-router-dom"; // 确保你使用 react-router-dom 进行路由

const NotFound = () => {
  const styles = {
    container: {
      display: "flex",
      flexDirection: "column",
      alignItems: "center",
      justifyContent: "center",
      height: "100vh",
      textAlign: "center",
      backgroundColor: "#f0f2f5",
    },
    title: {
      fontSize: "72px",
      fontWeight: "bold",
      color: "#ff4d4f",
    },
    subtitle: {
      fontSize: "24px",
      margin: "20px 0",
    },
    button: {
      marginTop: "20px",
    },
  };

  return (
    <div style={styles.container}>
      <div style={styles.title}>404</div>
      <div style={styles.subtitle}>抱歉，页面未找到!</div>
      <Link to="/">
        <Button type="primary" style={styles.button}>
          返回首页
        </Button>
      </Link>
    </div>
  );
};

export default NotFound;
